package com.woniuxy.project.campus.filter;//package com.woniuxy.project.geteway.filter;
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.cloud.gateway.filter.GatewayFilterChain;
//import org.springframework.cloud.gateway.filter.GlobalFilter;
//import org.springframework.core.annotation.Order;
//import org.springframework.http.server.reactive.ServerHttpRequest;
//import org.springframework.stereotype.Component;
//import org.springframework.web.server.ServerWebExchange;
//import reactor.core.publisher.Mono;
//
//import static jdk.nashorn.internal.runtime.regexp.joni.Config.log;
//
//@Component
//@Order(1)
//public class RequestLoggingFilter implements GlobalFilter {
//    private static final Logger logger = LoggerFactory.getLogger(RequestLoggingFilter.class);
//
//    @Override
//    public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {
//        ServerHttpRequest request = exchange.getRequest();
//        logger.info("请求进入网关，方法: {}, 路径: {}", request.getMethod(), request.getURI().getPath());
//        return chain.filter(exchange).doOnSuccess(aVoid -> {
//            logger.info("请求处理完成，响应返回网关");
//        });
//    }
//}